﻿// See https://aka.ms/new-console-template for more information
using GenerateCode.IService;
using GenerateCode.Service;
using GoodDotNet.Core.Data;
using GoodDotNet.Core.Model;
using GoodDotNet.IService;
using GoodDotNet.Service;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

 namespace GenerateCode
{
    public class Program
    {
        static void Main(string[] args)
        {
          
            

            /// 生成实体
            //CreateEntity("table_name");

            /// 修改项目名称
            new RenameService().Rename("SharpKnife");

        }
       
        static void CreateEntity(string table_name)
        {
             // 数据库连接
            var connectString = AppsettingsService.Get("connectionStrings");
            var conn = connectString.Get<List<ConnectionString>>();
            //其他类中获取
            var myService = new CreateEntityService(_conStr);
            myService.TableName("user")
                .Entity("GoodDotNet.Core.Entity", @"D:\goodProject\good-dotnet\GoodDoNet.Data\Entity\")
                .IRepository("GoodDotNet.Data.IRepository", @"D:\goodProject\good-dotnet\GoodDoNet.Data\IRepository\")
                .Repository("GoodDotNet.Core.Repository", @"D:\goodProject\good-dotnet\GoodDoNet.Data\Repository\");

        }
    }
}


